<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增授课老师安排')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-courseTeacher-add">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">安排课程：</label>
                    <div class="col-sm-8">
<!--                        <input name="arrangementId" class="form-control" type="text" required>-->
                        <select name="arrangementId" class="form-control">
                            <option th:each="courseArrangement:${courseArrangements}" th:value="${courseArrangement.arrangementId}" th:text="${courseArrangement.courseName}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">讲课教师：</label>
                    <div class="col-sm-8">
<!--                        <input name="teacherId" class="form-control" type="text" required>-->
                        <select name="teacherId" class="form-control">
                            <option th:each="teacher:${teachers}" th:value="${teacher.teacherId}" th:text="${teacher.teacherName}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">授课学时：</label>
                    <div class="col-sm-8">
                        <input name="teachHours" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "college/courseTeacher"
        $("#form-courseTeacher-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-courseTeacher-add').serialize());
            }
        }
    </script>
</body>
</html>